<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.config.SystemGlobals,java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.beans.music.*" %>
<%@ page import="com.business.music.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%String title="音乐列表"; %>
<%@ include file="header.jsp"%>
<% 	MusicListBus mlb=new MusicListBus();
	MusicTypeBus mtb=new MusicTypeBus();
	List MusicList=mlb.getAllMusicByUserName(username);
	List MusictypeList=mtb.getAllTypes(username);	
%>
<font color=red>您的音乐库中总共有<%=MusicList.size()%>首音乐</font>
<% if(MusictypeList==null||MusictypeList.size()==0) {%>
<br />
<center></center>
<br />
<% }else{
%>
<br />以下为音乐列表：
<table>
<tr><th width="20%">音乐盒名</th><th width=30% align="center">描述</th>
<th width=30% align=center>功能</th></tr>
<%
	for(int i=0;i<MusictypeList.size();i++) 
	{
		MusicType mt=(MusicType)MusictypeList.get(i);
%>
<tr><td width="20%"><%=mt.getMusictypeName()%></td><td width=30% align="left"><%=mt.getMusictypeMemo()%></td><td width=50% align=center>
<a href="updatemusictype?action=edit&id=<%=mt.getMusictypeId()%>">修改</a>&nbsp;<a href="updatemusictype?action=del&id=<%=mt.getMusictypeId()%>">删除</a></td></tr>
<%		} %>
</table>
<hr style="border:1px  dotted   #FFCC00 " />
<%
	}
 if(MusictypeList==null||MusictypeList.size()==0) {%>
<br />
<center><font color=red>还没有音乐!</font></center>
<br />
<% }else{
%>

<table>
<tr><th>音乐名</th>
<th  width="30%" >相关信息</th>
<th>所在音乐盒</th>
<th>是否显示</th>
<th width="20%" >功能选择</th>
</tr>
<%
for(int i=0;i<MusicList.size();i++) {
MusicInfo mi=(MusicInfo)MusicList.get(i);
%>
		
		  <tr color="red">
        <td ><a title="<%=mi.getMusicMemo()%>,点击试听" href="play/temp/<%=mi.getMusicNo()%>.html" target="_blank"><b><%=mi.getMusicName()%></b></a></td>
   
            <td  width="30%" align="left">歌手:<%=mi.getSinger()%>&nbsp;|&nbsp;专辑:<%=mi.getClassName()%><br/>歌词:<%if(mi.getLrcUrl()==null||mi.getLrcUrl().equals("")){%>无<%}else{%><a href="<%=path+mi.getLrcUrl()%>">地址</a><%}%><br/><%=mi.getAddTime()%><br/><a title="<%=basePath+mi.getMusicUrl()%>" href="<%=basePath+mi.getMusicUrl()%>"><font color=green>URL</font></a></td>
			<td ><a href="music/<%=username%>/<%=mi.getMusictypeId()%>/"><%=(new MusicTypeBus().getMusicTypeById(Integer.parseInt(mi.getMusictypeId()))).getMusictypeName()%></a></td>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%if(mi.getIsShow().equals("1")){%>是<%}else{%>否<%}%></td>
			  	<td width="20%" ><a href="updatemusic?action=edit&no=<%=mi.getMusicNo()%>">修改</a>&nbsp;&nbsp;<a href="updatemusic?action=del&no=<%=mi.getMusicNo()%>">删除</a></td>
        </tr>
		<%			}
			}
		%>
</table>
<%@include file="footer.jsp"%>
</body>

</html>
